FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}

{% block opensearch_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{{ macros.configure_user(name='opensearch-dashboards', shell='/bin/bash', homedir='/usr/share/opensearch-dashboards') }}
{{ macros.enable_extra_repos(['opensearch-dashboards']) }}

{% set opensearch_dashboards_packages = ['opensearch-dashboards'] %}

{{ macros.install_packages(opensearch_dashboards_packages | customizable("packages")) }}

RUN chown -R opensearch-dashboards:opensearch-dashboards /usr/share/opensearch-dashboards

COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start

{% block opensearch_footer %}{% endblock %}
{% block footer %}{% endblock %}

USER opensearch-dashboards
